package Sequence.sequence;

import java.util.Scanner;
import java.util.concurrent.ForkJoinPool;

public class yanghuisanjiao_2 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入杨辉三角的规格");
        int range=sc.nextInt();
        int[][] arr=new int[range][range];
        arr[0][0]=1;
        for (int i = 1; i <range ; i++) {
            arr[i][0]=1;
            for (int j = 1; j <=i ; j++) {
                arr[i][j]=arr[i-1][j-1]+arr[i-1][j];
            }
        }
        for (int row[]:arr){
            for (int row2:row){
                System.out.print(row2+" ");
            }
            System.out.println();
        }
    }
}

